const http = require('http');

class MyKoa {
  listen(...args) {
    const server = http.createServer((req, res) => {
      this.callback({
        req,
        res
      });
    })
    server.listen(...args);
  }
  use(callback) {
    console.log("use callback is running");
    this.callback = callback;
  }
}

module.exports = MyKoa;
